import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../zuoye527/login.vue'
import home from '../zuoye527/home.vue'
import one from '../zuoye527/son/one.vue'
import two from '../zuoye527/son/two.vue'
import three from '../zuoye527/son/three.vue'
import four from '../zuoye527/son/four.vue'
Vue.use(VueRouter)

const routes = [
   {
    path: '/',
    name: 'login',
    component: login
     },
     {
      path: '/home',
      name: 'home',
      redirect:'/home/one',
      component: home,
      children:[
        {
          path: 'one',
          name: 'one',
          component: one,
        },
        {
          path: 'two',
          name: 'two',
          component: two,
        },
        {
          path: 'three/:id/:name',
          name: 'three',
          component: three,
        },
        {
          path: 'four/:id/:name',
          name: 'four',
          component: four,
        }
      ]
       },
]

const router = new VueRouter({
  routes
})

export default router
